<%@page import="domain.model.Domain"%>
<%@page import="domain.data.QnAPersistenceManager"%>
<%@page import="javax.jdo.JDOHelper"%>
<%@page import="java.util.List"%>
<%@page import="javax.jdo.Query"%>
<%@page import="javax.jdo.PersistenceManager"%>
<%@page contentType="text/html;charset=UTF-8" language="java"%>
<%
String link = request.getHeader("referer");
if(link != null){
	String name = link.replaceAll("http://www.domainsgeeks.com/domain/","");
	
	PersistenceManager psm = QnAPersistenceManager.get().getPersistenceManager();

	Query query1 = psm.newQuery(Domain.class);
	query1.setFilter("name=='"+name+"'");
	List<Domain> domain = (List<Domain>)query1.execute();
	if(domain.size() > 0 && domain.get(0).getSex() != 1 && domain.get(0).getYahooBackLink() != 1)
	{
		domain.get(0).setSex(1);
		domain.get(0).setYahooBackLink(1);
		psm=JDOHelper.getPersistenceManager(domain.get(0));
		psm.currentTransaction().begin();
		psm.makePersistent(domain.get(0));
		psm.currentTransaction().commit();
	}
}

	%>
<a href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=habogay"><img src="/adv.jsp?image=728x90.gif"/></a>